package com.hyz.controller;

import com.hyz.pojo.ResponseResult;
import com.hyz.pojo.assetSecondment.AssetSecondmentResponse;
import com.hyz.pojo.assetSecondment.InsertAssetSecondmentRequest;
import com.hyz.pojo.assetSecondment.InsertAssetSecondmentResponse;
import com.hyz.service.AssetApplicantService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author HGD
 * @date 2022/10/4 23:13
 */
@Api("资产借调人员")
@RestController
@RequestMapping("/assetApplicant")
public class AssetApplicantController {
    @Autowired
    private AssetApplicantService service;

    @ApiOperation("创建资产申请")
    @ApiParam("资产申请请求")
    @ApiResponse(code = 200, message = "成功", response = ResponseResult.class)
    @PostMapping("/insertAssetSecondment")
    public ResponseResult<List<AssetSecondmentResponse>> insertAssetSecondment(@RequestBody InsertAssetSecondmentRequest request) {
        return service.insertAssetSecondment(request);
    }
}
